1. Field of the Invention
The present invention is related to an interpolation method and an interpolation circuit, and more particularly, to a method and a circuit for mixing a linear function and a sinusoidal function to perform interpolation.
2. Description of Related Art
Along with the high development of video image technique, digital cameras and digital camcorders have become one of the indispensable tools in the daily life. These devices may be built with various image processing functions or provide corresponding image processing software, so as to enable a user to magnify the image when taking the image, or browse or process the image after taking the image.
When the user needs to take a magnified image of a person or an object, he/she may use the built-in digital zoom function of the device to magnify the image and then take the shot. When the user needs to browse the detail of the captured image after taking the shot, he/she may use an image magnifying function of the image processing software associated with or accompanied by the camera, so as to get a clearer image.
However, when using the digital cameras in the market to perform a digital zoom in function, edges with sawtooth are often occurred. Similar image distortion may also occur when using image processing software to perform the image zoom in processing. That is because a linear interpolation method or a nearest point interpolation method is used for calculating the interpolation values between each two pixels in an original image and using the same as pixel values of newly added pixels after the image is magnified when performing the image zoom in process.
For example, FIG. 1 is a schematic diagram illustrating a conventional linear interpolation method of two points. Referring to FIG. 1, A and B are two adjacent pixels in the original image and are located in coordinates of 0 and 1, respectively. Y is the point to be interpolated for, which is located between coordinates 0 and 1 and has a distance x from the coordinate 0, wherein 0≦x<1. The interpolation value Y can be obtained through an interpolation formula as shown below:Y=(1−x)×A+x×B  (1)
However, although the calculation of the conventional linear interpolation method is simpler and the required hardware cost is lower, the calculated image qualify is worse, especially for the high frequency portion of the image. The image quality is usually unacceptable by the user. On the other hand, to use a higher order interpolation method to calculate the interpolation values, pixel values of more pixels are required to be referenced. Meanwhile, the size of disposition for the liner buffer should be increased so as to store pixel values of more horizontal lines. As a result, the cost of the hardware is increased.